<form id="sForm">
	<input type="hidden" name="frm" value="{$_act.frm}" />
	<input type="hidden" name="mdl" value="{$_act.mdl}" />
	<input type="hidden" name="do" value="{$_act.do}" />

	<input type="hidden" name="_filter" value="{$get._filter}" />
	<input type="hidden" name="_single" value="{$get._single}" />

	<table border="0" align="center" cellpadding="0" cellspacing="1" class="table_search">
		<tbody>
			<tr>
				<th>{$l.keyword}：</th>
				<td><input type="text" name="keyword" value="{$get.keyword}" class="input" style="width:360px;" /></td>
				<td class="w100p"></td>
				<td><input type="submit" name="btnSearch" value="{$l.search}" class="button" /></td>
				<td><input type="submit" name="btnExport" value="导出" class="button" /></td>
			</tr>
		</tbody>
	</table>

	<br />

	<div class="form_data_cut">
		<div class="right">
			<a href="./m.php?frm=goods&mdl=brand&do=edit" target="eBody">添加</a>
			<div class="clear"></div>
		</div>
		
		<!-- 排序字段 START -->
		{include file="_major_sort.lbi"}
		<!-- 排序字段 END -->

		<div class="clear"></div>
	</div>
</form>

<div class="space10"><!-- 间隔 --></div>
<form action="./m.php?frm=action&mdl=index" name="lForm" id="lForm" method="post" target="eBody">
	<input type="hidden" name="formAction" value="" />
	<input type="hidden" name="goback" value="frlist" />
	<input type="submit" id="btnSubmit" class="hide" />
	<table align="center" class="data_form">
		<caption>
		{$_page.caption}
		</caption>
		<thead>
			<tr>
				<th style="width:22px;">{if $_single != 'yes'}<input type="checkbox" title="{$l.selall}/{$l.selnone}" class="chbox" />{/if}</th>
				<th style="width:320px;">LOGO</th>
				<th style="width:160px;">{$l.name}</th>
				<th style="width:80px;">{$l.mark}</th>
				<th>URL</th>
				<th style="width:48px;">{$l.rank}</th>
				<th style="width:150px;">{$l.time}</th>
				<th style="width:30px;">{$l.operation}</th>
			</tr>
		</thead>
		<tbody>
		
		{foreach from=$list item=row}
		<tr>
			<th>
				{if $_single == 'yes'}
				<input type="radio" name="list[]" value="{$row.id}" />
				{else}
				<input type="checkbox" name="list[]" value="{$row.id}" /><input type="hidden" name="lst[{$row.id}]" value="{$row.id}" />
				{/if}
			</th>
			<td rel="logo"><a href="{$_s.up_dir}{$row.logo}" title="{$row.name}" class="open_frame"><img src="{$_s.up_dir}thumb/{$row.logo}" onload="drawImage(this, 200, 120);" width="10" height="10" /></a></td>
			<td rel="name"><a href="{$row.url}" title="{$row.name}" class="open_frame">{$row.name}</a></td>
			<td>{$row.mark}</td>
			<td><a href="{$row.url}" title="{$row.name}" class="open_frame">{$row.url}</a></td>
			<td><input type="text" name="rank[{$row.id}]" value="{$row.rank}" class="input" style="width:48px;" /></td>
			<td>{$row.addtime} <br />
				{$row.updatetime}</td>
			<td><a href="./m.php?frm=goods&mdl=brand&do=edit&id={$row.id}" target="eBody">{$l.edit}</a></td>
		</tr>
		{/foreach}
		</tbody>
		
	</table>

</form>
	<!--  -->
	<table border="0" align="center" cellpadding="0" cellspacing="1" class="data_form">
		<tfoot id="cmd">
			<tr>
				<td><div class="btns"><!--<select class="select"><option></option>-->
						{if $_filter == 'yes'}
						<button id="_btnTransmit" class="button">返回选择数据</button>
						{else}
							<!--{if $_g._mp_goods_brand_del}-->
							<button name="formAction" value="{$_act.frm}.brand_del" class="button">{$l.del}</button>
							<!--{/if}--><!--</select>-->
							<!--{if $_g._mp_goods_brand_rank}-->
							<button name="formAction" value="{$_act.frm}.brand_rank" class="button">{$l._mp_goods_brand_rank}</button>
							<!--{/if}-->
						{/if}
					</div>
					{include file="./_pagelist.tpl"}</td>
			</tr>
		</tfoot>
	</table>


<div class="space5"><!-- 间隔 --></div>
<div class="data_memo"></div>

<script type="text/javascript" language="JavaScript" charset="utf-8">
<!--
	{literal}
	jQuery(function($){
		$('#_btnTransmit').click(_transmit);
		
	});

	function _transmit(){	// 将选择的数据返回给上一层
		var brand_arr = [];
		$('.data_form tbody tr th input[name="list[]"]:checked').each(function(index, domEle){
			brand_arr.push({
				'id'	: $(this).val()
				,'name'	: $(this).parents('th').siblings('td[rel="name"]').find('a').text()
				,'logo'	: $(this).parents('th').siblings('td[rel="logo"]').find('a > img').attr('src')
			});
		});
		if(brand_arr.length == 0){
			showmsg_warning('您还未钩选品牌');
			return false;
		}
		try{
			window.parent._receive_brand(brand_arr);
			myconfirm('品牌已成功传递给上层页面^_^<br />现在关闭本弹出窗口？', {
				type	: 'right'
				,submit	: function(e, v, m, f){
					if(v == true){
						window.parent.close_div();
					}
				}
			});
		}catch(e){}
	}

	{/literal}
-->
</script>